<h2><?php echo __('Picture Management', true); ?></h2>
<div style="text-align:right; padding:5px 0px;">
	<a href="<?php echo Router::url('/pictures/add', true); ?>" class="addText">
			<?php echo __('Add Item', true); ?>
		</a>
</div>	
<div id="container">
<form id="page" method="post" action="/pictures" enctype="application/x-www-form-urlencoded">
<?php echo $session->flash(); ?>
<table id="box-table-a">
	<thead>
		<tr>
			<th scope="col" style="width:5%"></th>
			<th scope="col" style="width:5%">ID</th>
			<th scope="col"><?php echo __('Name', true); ?></th>
			<th scope="col"><?php echo __('Image', true); ?></th>
			<?php if ($ac == 'inside_banner') { ?>
			<th scope="col"><?php echo __('Kind', true); ?></th>
			<?php }?>
			<th scope="col" style="width:20%"><?php echo __('Date', true); ?></th>
			<th scope="col"><?php echo __('Status', true); ?></th>
			<th scope="col" style="width:10%"><?php echo __('Action', true); ?></th>
		</tr>
	</thead>
	<tbody>
		<?php foreach ($pictures as $item) {?>
		<tr>
			<td><?php ?></td>
			<td><?php echo $item['Picture']['id']; ?></td>
			<td><?php echo $item['Picture']['name']; ?></td>
			<td><img src="<?php echo $item['Picture']['image_link']; ?>" width="100px" height="80px"></td>
			<?php if ($ac == 'inside_banner') { ?>
			<td><?php echo $item['Content']['name']; ?></td>
			<?php }?>
			<td><?php echo $item['Picture']['date']; ?></td>
			<td><img src="<?php echo ($item['Picture']['status'] == 0)?'img/unpublish.gif':'img/publish.gif'; ?>" title=""></td>
			<td>
				<span><a href="<?php echo Router::url('/picture/edit/'.$item['Picture']['id'], true); ?>"><img src="img/pencil.png" title="Edit"></a></span>
				<span style="padding-left:20px;"><a href="<?php echo Router::url('/pictures/del/'.$item['Picture']['id'], true); ?>"><img src="img/cross.png" title="Delete"></a></span>
			</td>
		</tr>
		<?php } ?>
	</tbody>
</table>
</form>
</div>